package com.vtech.ws.cxf.service;

import com.vtech.ws.cxf.entity.Greeting;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

/**
 * TODO
 * SOAP webservice
 * @author houzhiwei
 * @date 2018/7/22 16:27
 */
@WebService(
        name = "hiService", // 暴露服务名称
        targetNamespace = "http://cxf.ws.vtech.com" // 命名空间,一般是接口的包名倒序
)
public interface CxfService {
    @WebMethod
    @WebResult(name = "String", targetNamespace = "")
    String sayHi(@WebParam(name = "hi") String hi);

    @WebMethod()
    @WebResult(name = "Greeting")
    public Greeting sayBye(@WebParam(name = "GreetingsRequest") String name);

    /**
     * public 方法若不想公开，则需要加 @WebMethod(exclude=true)
     * static 、final、protected 和 private 方法默认不公开
     */
}
